<?php
class UserAttention extends EMongoDocument
{
    public $userid;
    //关注
    public $goods;

    /**
     * This method have to be defined in every Model
     * @return string MongoDB collection name, witch will be used to store documents of this model
     */
    public function getCollectionName()
    {
        return 'user_attention';
    }
 
    // And attribute names too
    public function attributeNames() {
        return array(
        'userid'=>'userid',
        'goods'=>'goods',
        '_id'=>'_id',
    	);
    }

    /**
     * This method have to be defined in every model, like with normal CActiveRecord
     */
    public static function model($className=__CLASS__)
    {
        return parent::model($className);
    }
    // NOTE: for embedded documents we do not define static model method!
    //       we do not define getCollectionName method either.
}